-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filebeat gcs input addFiledJobs panic protection #38407
Conversation
In case `obj, err := s.bucket.Object(name).Attrs(ctx)` return an error, obj will be probably `nil` in consequence the code below will panic `objectURI := "gs://" + s.src.BucketName + "/" + obj.Name`
💚 CLA has been signed |
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
It seems I don't have permission to add any label. It's a bugfix and doesn't change anything except protecting against panic. It shout go probably as a patch. |
/test |
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
Hi @adassow, thanks for the PR, will get it merged asap. Could you please add an entry in CHANGELOG-developer.next.asciidoc, that would be great. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Head branch was pushed to by a user without write access
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
@ShourieG How can I satisfy |
buildkite test this rebuild |
@@ -92,6 +92,7 @@ The list below covers the major changes between 7.0.0-rc2 and main only. | |||
- Make winlogbeat/sys/wineventlog follow the unsafe.Pointer rules. {pull}36650[36650] | |||
- Cleaned up documentation errors & fixed a minor bug in Filebeat Azure blob storage input. {pull}36714[36714] | |||
- Fix copy arguments for strict aligned architectures. {pull}36976[36976] | |||
- Fix filebit gcs input panic {pull}38407[38407] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This entry should be added to CHANGELOG.next.asciidoc
. The "developer" file is focused mainly on API changes or internal-only fixes (without a user impact).
filebit -> filebeat
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will create a PR to shift this around, since auto merge was enabled and it got merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Filebeat gcs input addFiledJobs panic protection In case `obj, err := s.bucket.Object(name).Attrs(ctx)` return an error, obj will be probably `nil` in consequence the code below will panic `objectURI := "gs://" + s.src.BucketName + "/" + obj.Name` * Update CHANGELOG-developer.next.asciidoc (cherry picked from commit c6fd99c)
* Filebeat gcs input addFiledJobs panic protection In case `obj, err := s.bucket.Object(name).Attrs(ctx)` return an error, obj will be probably `nil` in consequence the code below will panic `objectURI := "gs://" + s.src.BucketName + "/" + obj.Name` * Update CHANGELOG-developer.next.asciidoc (cherry picked from commit c6fd99c)
…ion (#38475) * Filebeat gcs input addFiledJobs panic protection (#38407) * Filebeat gcs input addFiledJobs panic protection In case `obj, err := s.bucket.Object(name).Attrs(ctx)` return an error, obj will be probably `nil` in consequence the code below will panic `objectURI := "gs://" + s.src.BucketName + "/" + obj.Name` * Update CHANGELOG-developer.next.asciidoc (cherry picked from commit c6fd99c) * Update CHANGELOG-developer.next.asciidoc --------- Co-authored-by: Adam Sowiński <[email protected]> Co-authored-by: ShourieG <[email protected]>
…ion (#38474) * Filebeat gcs input addFiledJobs panic protection (#38407) * Filebeat gcs input addFiledJobs panic protection In case `obj, err := s.bucket.Object(name).Attrs(ctx)` return an error, obj will be probably `nil` in consequence the code below will panic `objectURI := "gs://" + s.src.BucketName + "/" + obj.Name` * Update CHANGELOG-developer.next.asciidoc (cherry picked from commit c6fd99c) * Update CHANGELOG-developer.next.asciidoc --------- Co-authored-by: Adam Sowiński <[email protected]> Co-authored-by: ShourieG <[email protected]>
In case
obj, err := s.bucket.Object(name).Attrs(ctx)
return an error, obj will be probablynil
in consequence the code below will panicobjectURI := "gs://" + s.src.BucketName + "/" + obj.Name
Proposed commit message
Filebeat gcs input addFiledJobs panic protection
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
No idea
How to test this PR locally
No idea
Related issues
No idea
Use cases
No idea
Screenshots
Logs